package com.dbtimer.dbupdatespring.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 测点信息管理--该表存放测点的一些重要信息
 * @author swx
 * @TableName point_info_important
 */
@TableName(value ="point_info_important")
@Data
public class PointInfoImportantEntity implements Serializable {
    /**
     * 唯一标识
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 测点编号
     */
    @TableField(value = "point_index")
    private String pointIndex;

    /**
     * 测点类型
     */
    @TableField(value = "point_type")
    private String pointType;

    /**
     * 工程对象
     */
    @TableField(value = "engineering")
    private String engineering;

    /**
     * 测点布置工程部位
     */
    @TableField(value = "point_position")
    private String pointPosition;

    /**
     * 测点布置具体位置，坐标
     */
    @TableField(value = "coordinate")
    private String coordinate;

    /**
     * 测点中仪器的测聊状态
     */
    @TableField(value = "point_status")
    private String pointStatus;

    /**
     * 监测项目
     */
    @TableField(value = "monitor_category")
    private String monitorCategory;

    /**
     * 观测频次
     */
    @TableField(value = "frequency")
    private String frequency;

    /**
     * 仪器类型
     */
    @TableField(value = "type")
    private String type;

    /**
     * 仪器编码
     */
    @TableField(value = "code")
    private String code;

    /**
     * 该测点最后的观测时间
     */
    @TableField(value = "last_view_time")
    private Date lastViewTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        PointInfoImportantEntity other = (PointInfoImportantEntity) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getPointIndex() == null ? other.getPointIndex() == null : this.getPointIndex().equals(other.getPointIndex()))
            && (this.getPointType() == null ? other.getPointType() == null : this.getPointType().equals(other.getPointType()))
            && (this.getEngineering() == null ? other.getEngineering() == null : this.getEngineering().equals(other.getEngineering()))
            && (this.getPointPosition() == null ? other.getPointPosition() == null : this.getPointPosition().equals(other.getPointPosition()))
            && (this.getCoordinate() == null ? other.getCoordinate() == null : this.getCoordinate().equals(other.getCoordinate()))
            && (this.getPointStatus() == null ? other.getPointStatus() == null : this.getPointStatus().equals(other.getPointStatus()))
            && (this.getMonitorCategory() == null ? other.getMonitorCategory() == null : this.getMonitorCategory().equals(other.getMonitorCategory()))
            && (this.getFrequency() == null ? other.getFrequency() == null : this.getFrequency().equals(other.getFrequency()))
            && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
            && (this.getCode() == null ? other.getCode() == null : this.getCode().equals(other.getCode()))
            && (this.getLastViewTime() == null ? other.getLastViewTime() == null : this.getLastViewTime().equals(other.getLastViewTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getPointIndex() == null) ? 0 : getPointIndex().hashCode());
        result = prime * result + ((getPointType() == null) ? 0 : getPointType().hashCode());
        result = prime * result + ((getEngineering() == null) ? 0 : getEngineering().hashCode());
        result = prime * result + ((getPointPosition() == null) ? 0 : getPointPosition().hashCode());
        result = prime * result + ((getCoordinate() == null) ? 0 : getCoordinate().hashCode());
        result = prime * result + ((getPointStatus() == null) ? 0 : getPointStatus().hashCode());
        result = prime * result + ((getMonitorCategory() == null) ? 0 : getMonitorCategory().hashCode());
        result = prime * result + ((getFrequency() == null) ? 0 : getFrequency().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        result = prime * result + ((getCode() == null) ? 0 : getCode().hashCode());
        result = prime * result + ((getLastViewTime() == null) ? 0 : getLastViewTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", pointIndex=").append(pointIndex);
        sb.append(", pointType=").append(pointType);
        sb.append(", engineering=").append(engineering);
        sb.append(", pointPosition=").append(pointPosition);
        sb.append(", coordinate=").append(coordinate);
        sb.append(", pointStatus=").append(pointStatus);
        sb.append(", monitorCategory=").append(monitorCategory);
        sb.append(", frequency=").append(frequency);
        sb.append(", type=").append(type);
        sb.append(", code=").append(code);
        sb.append(", lastViewTime=").append(lastViewTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}